+++ /dev/null
-#
-# Copyright (C) 2006-2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=stress
-PKG_VERSION:=1.0.7
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://github.com/resurrecting-open-source-projects/stress/releases/download/${PKG_VERSION}/
-PKG_HASH:=e63adb57597e617c14ecb0d841b5d990460796d9e9ec69bd56fe645ef02eb239
-
-PKG_LICENSE:=GPL-2.0-only
-PKG_LICENSE_FILES:=COPYING
-
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/stress
- SECTION:=utils
- CATEGORY:=Utilities
- TITLE:=stress is a simple stress utility
- URL:=
-endef
-
-define Package/stress/description
-stress is a simple tool that imposes certain types of compute \ stress on
-UNIX-like operating systems.
-endef
-
-define Package/stress/install
- $(INSTALL_DIR) $(1)/usr/bin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stress $(1)/usr/bin/
-endef
-
-$(eval $(call BuildPackage,stress))
+++ /dev/null
---- a/src/stress.c
-+++ b/src/stress.c
-@@ -266,9 +266,12 @@ main (int argc, char **argv)
- while ((forks = (do_cpu + do_io + do_vm + do_hdd)))
- {
- long long backoff, timeout = 0;
-+ struct timespec b;
-
- /* Calculate the backoff value so we get good fork throughput. */
- backoff = do_backoff * forks;
-+ b.tv_sec = backoff / 1000000;
-+ b.tv_nsec = (backoff % 1000000) * 1000;
- dbg (stdout, "using backoff sleep of %llius\n", backoff);
-
- /* If we are supposed to respect a timeout, calculate it. */
-@@ -304,7 +307,7 @@ main (int argc, char **argv)
- case 0: /* child */
- worker_init();
- alarm (timeout);
-- usleep (backoff);
-+ nanosleep (&b, NULL);
- if (do_dryrun)
- exit (0);
- exit (hogcpu ());
-@@ -326,7 +329,7 @@ main (int argc, char **argv)
- case 0: /* child */
- worker_init();
- alarm (timeout);
-- usleep (backoff);
-+ nanosleep (&b, NULL);
- if (do_dryrun)
- exit (0);
- exit (hogio ());
-@@ -347,7 +350,7 @@ main (int argc, char **argv)
- case 0: /* child */
- worker_init();
- alarm (timeout);
-- usleep (backoff);
-+ nanosleep (&b, NULL);
- if (do_dryrun)
- exit (0);
- exit (hogvm (do_vm_bytes, do_vm_stride, do_vm_hang, do_vm_keep));
-@@ -368,7 +371,7 @@ main (int argc, char **argv)
- case 0: /* child */
- worker_init();
- alarm (timeout);
-- usleep (backoff);
-+ nanosleep (&b, NULL);
- if (do_dryrun)
- exit (0);
- exit (hoghdd (do_hdd_bytes));